﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharePointSiteConfigurator
{
    public class IrmSettingsItem
    {
        // <IrmSettings ListInstance="Documents" IrmEnabled="true" IrmTitle="TestTitle" IrmDescription="Test description"
        //     IrmPrint="true" IrmVBA="false" IrmOffline="false" IrmOfflineDays="10" IrmReject="true" IrmExpire="true" IrmExpireDate=""/>

        public string ListInstance { get; set; }
        public Boolean IrmEnabled { get; set; }
        public string IrmTitle { get; set; }
        public string IrmDescription { get; set; }
        public Boolean IrmPrint { get; set; }
        public Boolean IrmVBA { get; set; }
        public Boolean IrmOffline { get; set; }
        public Int32 IrmOfflineDays { get; set; }
        public Boolean IrmReject { get; set; }
        public Boolean IrmExpire { get; set; }
        public string IrmExpireDate { get; set; }

        public IrmSettingsItem(string listInstance, Boolean irmEnabled, string irmTitle, string irmDescription, Boolean irmPrint, Boolean irmVba,
            Boolean irmOffline, Int32 irmOfflineDays, Boolean irmReject, Boolean irmExpire, System.Xml.Linq.XAttribute irmExpireDate)
        {
            this.ListInstance = listInstance;
            this.IrmEnabled = irmEnabled;
            this.IrmTitle = irmTitle;
            this.IrmDescription = irmDescription;
            this.IrmPrint = irmPrint;
            this.IrmVBA = irmVba;
            this.IrmOffline = irmOffline;
            this.IrmOfflineDays = irmOfflineDays;
            this.IrmReject = irmReject;
            this.IrmExpire = irmExpire;
            if (irmExpireDate == null || irmExpireDate.Value == null) this.IrmExpireDate = null; else this.IrmExpireDate = irmExpireDate.Value;
        }


    }
}
